package com.zhao.data.test;

import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

import com.zhao.data.repository.RoleRepository;
import com.zhao.test.UnitTesting;

public class MapperRunnerTesting extends UnitTesting {

	@Autowired
	RoleRepository roleRepository;

	@Test
	public void testMybatisPager() {
		//		PageHelper.startPage(1, 10);
		//		List<User> list = usersMapper.selectAll();
		//		PageInfo<User> pager = new PageInfo<User>(list);
		//		logger.debug("总数" + pager.getTotal() + "页数" + pager.getPageNum());
	}

	@Test
	public void testJpa() {
		//		Page<RoleEntity> page = roleRepository.findAll(new PageRequest(1, 10));
		//		logger.debug("总数" + page.getTotalElements() + "页数" + page.getTotalPages());
	}
}
